#include <iostream>
#include "vectorfunctions.h"

int oddDigits(int n)
{	int x;
	while(n>0){
		x=n%10;		
		if(x%2==0)
			return 0;
		else 
			n /= 10; 
		} 
return 1;
}

int sumOdd(int x[], int l)
{
	int i, sum=0;
	for (i=0;i<l;i++)
		if(oddDigits(x[i]))
			sum += x[i];
return sum;
}

int main()
{
	int l, sum;
	int x[100];
	cout<<"Length of array : ";
	cin>>l;
	readVector(x, l);
	sum=sumOdd(x, l);
	cout<<sum<<"\n";
	
return 0;
}
